package com.cardone.platform.usercenter.service;

import java.util.List;

import lombok.Getter;
import lombok.Setter;

import com.cardone.common.dto.PaginationDto;
import com.cardone.context.ContextHolder;
import com.cardone.platform.usercenter.dao.UserActivationDao;
import com.cardone.platform.usercenter.dto.UserActivationDto;

/**
 * 用户激活服务
 *
 * @author yaohaitao
 *
 */
@Getter
@Setter
public class UserActivationDefaultService implements UserActivationService {
	@Override
	public int deleteByIds(final UserActivationDto deleteUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).deleteByIds(deleteUserActivation);
	}

	@Override
	public <P> P findByCodeOrId(final Class<P> mappedClass, final UserActivationDto findUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).findByCodeOrId(mappedClass, findUserActivation);
	}

	@Override
	public <P> P findById(final Class<P> mappedClass, final UserActivationDto findUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).findById(mappedClass, findUserActivation);
	}

	@Override
	public <P> List<P> findListByLikeCode(final Class<P> mappedClass, final UserActivationDto findListUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).findListByLikeCode(mappedClass, findListUserActivation);
	}

	@Override
	public int insertByCode(final UserActivationDto insertUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).insertByCode(insertUserActivation);
	}

	@Override
	public <P> PaginationDto<P> paginationByLikeCode(final Class<P> mappedClass, final UserActivationDto paginationUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).paginationByLikeCode(mappedClass, paginationUserActivation);
	}

	@Override
	public Integer readByCodeNqIdForCount(final UserActivationDto readUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).readByCodeNqIdForCount(readUserActivation);
	}

	@Override
	public <P> P saveByIdOrCode(final Class<P> mappedClass, final UserActivationDto saveUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).saveByIdOrCode(mappedClass, saveUserActivation);
	}

	@Override
	public int updateByCode(final UserActivationDto updateUserActivation) {
		return ContextHolder.getBean(UserActivationDao.class).updateByCode(updateUserActivation);
	}
}